
export default {
    inserted(el,binding){
        const {value} = binding
        if(value){
            const scope=value
            const hasPermission=getPermission(scope)
            if(!hasPermission){
                el.parentNode.removeChild(el)
            }
        }
    }
}
export function getPermission(scope){
    let btnScope=['add','delete','update','query']
    return btnScope.includes(scope)
}